#include <iostream>
#include <string>
#include "file.h"

using namespace std;

int main(int argc, char const *argv[])
{
    My_File fs_1;
    My_File fs_2;

    // 打开文件
    fs_1.open("hqyj_1.txt" , "r+" );
    if (!fs_1.is_open())
    {
        cout << "打开失败" << endl;
        return 0;
    }

    fs_2.open("hqyj_2.txt" , "r+" );
    if (!fs_2.is_open())
    {
        cout << "打开失败" << endl;
        return 0;
    }

    fs_1 << "hello";

    fs_1.seek(0 , SEEK_SET);

    fs_1 << "hqyj";


    fs_1.close();
    fs_2.close();
    return 0;
}
